package com.zhsq.zlc.service.dictionary;

import com.zhsq.zlc.dao.dictionary.DictionaryMapper;
import com.zhsq.zlc.entity.DictionaryEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class DictionaryServiceImpl implements DictionaryService {

	@Autowired
	private DictionaryMapper dictionaryMapper;

	@Override
	@Transactional
	public List<DictionaryEntity> list(DictionaryEntity entity) throws Exception {
		return dictionaryMapper.list(entity);
	}

	@Override
	public DictionaryEntity listByOther(DictionaryEntity entity) throws Exception {
		return dictionaryMapper.listByOther(entity);
	}

	@Override
	public DictionaryEntity getDictionaryById(DictionaryEntity entity) throws Exception {
		return dictionaryMapper.getDictionaryById(entity);
	}

	@Override
	@Transactional
	public int count(DictionaryEntity entity) throws Exception {
		return dictionaryMapper.count(entity);
	}

	@Override
	@Transactional
	public void add(DictionaryEntity entity) throws Exception {
		dictionaryMapper.add(entity);
	}

	@Override
	@Transactional
	public void edit(DictionaryEntity entity) throws Exception {
		dictionaryMapper.edit(entity);
	}

	@Override
	@Transactional
	public void delete(int id) throws Exception {
		dictionaryMapper.delete(id);
	}

	

}
